using System;

namespace Empanada
{
    public class EmpanadaPendingChange
    {
        public string ChangeTypeName { get; set; }
        public string FileName { get; set; }
        public string Folder { get; set; }

        public string Path { get; set; }

        public override string ToString()
        {
            return String.Concat(FileName, "; ", ChangeTypeName, "; ", Folder);
        }

        public override bool Equals(object obj)
        {
            var change = obj as EmpanadaPendingChange;
            if (change == null) return Equals(this, obj);
            return string.Equals(Path, change.Path, StringComparison.InvariantCultureIgnoreCase);
        }

        public override int GetHashCode()
        {
            return Path.GetHashCode();
        }
    }
}